home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / linuxdoc-sgml-1.1 / html-fix / html2html.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-05-03  |  25.8 KB  |  1,780 lines

  1. # include "stdio.h"
  2. # define U(x) x
  3. # define NLSTATE yyprevious=YYNEWLINE
  4. # define BEGIN yybgin = yysvec + 1 +
  5. # define INITIAL 0
  6. # define YYLERR yysvec
  7. # define YYSTATE (yyestate-yysvec-1)
  8. # define YYOPTIM 1
  9. # define YYLMAX BUFSIZ
  10. # define output(c) putc(c,yyout)
  11. # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
  12. # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
  13. # define yymore() (yymorfg=1)
  14. # define ECHO fprintf(yyout, "%s",yytext)
  15. # define REJECT { nstr = yyreject(); goto yyfussy;}
  16. int yyleng; extern char yytext[];
  17. int yymorfg;
  18. extern char *yysptr, yysbuf[];
  19. int yytchar;
  20. FILE *yyin = {stdin}, *yyout = {stdout};
  21. extern int yylineno;
  22. struct yysvf { 
  23.     struct yywork *yystoff;
  24.     struct yysvf *yyother;
  25.     int *yystops;};
  26. struct yysvf *yyestate;
  27. extern struct yysvf yysvec[], *yybgin;
  28.  
  29. #include <malloc.h>
  30. #include <stdio.h>
  31. #include <string.h>
  32.  
  33. /* #define DEBUG */
  34.  
  35. FILE *out = NULL;
  36.  
  37. char buf[2048], sectname[256], labeltxt[256];
  38. char firstname[256], outname[256];
  39. char ssectname[256], Tmp1[4096], Tmp2[256], headname[256];
  40. char urlname[256], Headbuf[4096], refname[256];
  41.  
  42. int filenum = 1;
  43. int tmpfn;
  44. int secnr = 0;
  45. int ssecnr;
  46. int current;
  47. int skipnewline = 0;
  48.  
  49. #define CHAPTER 1
  50. #define SECTION 2
  51. #define SUBSECT 3
  52.  
  53. int getstr( char *str, int n )
  54.   {
  55.     int i;
  56. #ifdef DEBUG
  57.     fprintf( stderr, "DEBUG: yytext: <<%s>>\n", yytext );
  58. #endif
  59.     if( strlen( yytext ) == n )
  60.       return 0;
  61.     strncpy( str, yytext+n, yyleng-n);
  62.     str[ yyleng-n ] = 0;
  63.     return 1;
  64.   }
  65.  
  66. struct lprec
  67.   {
  68.     char *label;
  69.     int fileno;
  70.     struct lprec *next;
  71.   };
  72.  
  73. typedef struct lprec lprec;
  74.  
  75. lprec *putlp();
  76. lprec *getlp();
  77.  
  78. lprec *lp_table = (lprec *)0;
  79. lprec *tmplp;
  80.  
  81. lprec *
  82. putlp( char *lbl, int fn )
  83.   {
  84.     lprec *ptr;
  85.     ptr = (lprec *) malloc (sizeof (lprec));
  86.     ptr->label = (char *) malloc (strlen (lbl) +1 );
  87.     strcpy( ptr->label, lbl );
  88.     ptr->fileno = fn;
  89.     ptr->next = (struct lprec *)lp_table;
  90.     lp_table = ptr;
  91.     return ptr;
  92.   }
  93.  
  94. lprec *
  95. getlp( char *lbl )
  96.   {
  97.     lprec *ptr;
  98.     for (ptr = lp_table; ptr != (lprec *) 0;
  99.      ptr = (lprec *)ptr->next)
  100.       if (strcmp (ptr->label,lbl) == 0)
  101.     return ptr;
  102.     return 0;
  103.   }
  104.  
  105. # define SECT 2
  106. # define YYNEWLINE 10
  107. yylex(){
  108. int nstr; extern int yyprevious;
  109. while((nstr = yylook()) >= 0)
  110. yyfussy: switch(nstr){
  111. case 0:
  112. if(yywrap()) return(0); break;
  113. case 1:
  114.     {
  115.  
  116.     skipnewline=1;
  117.     getstr( urlname, 7 ); 
  118.     sprintf( Headbuf, "<a href=\"%s\"> ", urlname);
  119. }
  120. break;
  121. case 2:
  122. {
  123.     sprintf( Tmp1, " %s </a>", urlname);
  124.     strcat (Headbuf, Tmp1);
  125. }
  126. break;
  127. case 3:
  128. {
  129.  
  130.     skipnewline=0;
  131.     if (out) {
  132.        fprintf( out, "%s", Headbuf);
  133.     } else {
  134.        printf( "%s", Headbuf);
  135.     }
  136.     strcpy (Headbuf,"");
  137. }
  138. break;
  139. case 4:
  140.     {
  141.  
  142. strcpy( sectname, yytext+9 );
  143. printf( "<title>%s</title>\n<h1>%s</h1>\n",
  144.        sectname, sectname );
  145. }
  146. break;
  147. case 5:
  148.     {
  149.  
  150.     skipnewline=1;
  151.     getstr( headname, 8 ); 
  152.     sprintf( Headbuf, "<h3> %s ", headname);
  153. }
  154. break;
  155. case 6:
  156. {
  157.  
  158.   if (out) {
  159.     fprintf( out, "%s", Headbuf );
  160.     strcpy(Headbuf, "");
  161.     switch (current){
  162.     case CHAPTER:
  163.         current=0;
  164.         break;
  165.     case SECTION:
  166.         current=0;
  167.         fprintf( out, "</h1>\n<p> <a href=\"%s.html#toc%d\"> Contents of this section</a></p>\n",firstname,secnr);
  168.         break;
  169.     case SUBSECT:
  170.         current=0;
  171.         fprintf( out, "</h2>\n");
  172.         break;
  173.     default:
  174.         current=0;
  175.     fprintf( out, "</h3>\n");
  176.         break;
  177.     }
  178.   } else {
  179.     printf("%s", Headbuf );
  180.     strcpy(Headbuf, "");
  181.     switch (current){
  182.     case CHAPTER:
  183.         current=0;
  184.         break;
  185.     case SECTION:
  186.         current=0;
  187.         printf("</h1>\n<p> <a href=\"%s.html#toc%d\"> Contents of this section</a></p>\n",firstname,secnr);
  188.         break;
  189.     case SUBSECT:
  190.         current=0;
  191.         printf("</h2>\n");
  192.         break;
  193.     default:
  194.         current=0;
  195.         printf("</h3>\n");
  196.         break;
  197.     }
  198.   }
  199.   skipnewline=0;
  200. }
  201. break;
  202. case 7:
  203.     { 
  204.  
  205.     skipnewline=1;
  206.     getstr( sectname, 8 ) ;
  207.     if( out ) 
  208.       {
  209.     fclose( out );
  210.       }
  211.     current=SECTION;
  212.     secnr++;
  213.     ssecnr=0;
  214.     sprintf( outname, "%s-%d.html", firstname, filenum++ );
  215.     out = fopen( outname, "w" );
  216.     fprintf( out, "<title>%s</title>\n", sectname );
  217.     sprintf( Headbuf, "<h1>%d <a name=\"s%d\"> %s ",secnr, secnr, sectname );
  218.     fprintf( stdout, "<p><h2><a name=\"toc%d\">",secnr);
  219.     fprintf( stdout, "%d. <a href=\"%s\">%s</a></h2>\n<ul>\n", secnr, outname,
  220.         sectname );
  221. }
  222. break;
  223. case 8:
  224.          { 
  225.  
  226.     skipnewline=1;
  227.     getstr( ssectname, 9 ) ;
  228.     current=SUBSECT;
  229.     ssecnr++;
  230.     sprintf( Headbuf, "<h2>%d.%d <A Name=\"ss%d.%d\"> %s ",secnr, ssecnr, secnr, ssecnr, ssectname );
  231.     fprintf( stdout, "<h4><a href=\"%s#ss%d.%d\">%d.%d %s</a></h4>\n", outname, secnr, ssecnr, secnr, ssecnr,
  232.             ssectname );
  233. }
  234. break;
  235. case 9:
  236.     {
  237.  
  238. getstr( sectname, 9 );
  239. sectname[ yyleng-14 ] = 0;
  240. printf( "<h1>%s</h1>\n", sectname );
  241. }
  242. break;
  243. case 10:
  244. ;
  245. break;
  246. case 11:
  247. {
  248.  
  249. if (filenum>=3) {
  250.   sprintf(Tmp1,"%s-%d.html",firstname, (filenum - 2));
  251. } else {
  252.   sprintf(Tmp1,"%s.html",firstname);
  253. }
  254. sprintf(Tmp2,"%s-%d.html",firstname, (filenum ));
  255. fprintf(out, "<p><a href=\"%s\"> Next </a> Chapter, <a href=\"%s\"> Previous </a> Chapter</p>",
  256.                    Tmp2, Tmp1);
  257. sprintf(Tmp2,"%s.html",firstname);
  258. fprintf(out, "<p>Table of contents of <a href=\"%s#toc%d\">this chapter</a>,\n",Tmp2, filenum-1 );
  259. fprintf(out, " General <a href=\"%s#toc\">table of contents</a></p>\n",Tmp2);
  260. fprintf(out, "<p><a href=\"%s\"> Top </a> of the document,\n <a href=\"#0\"> Beginning of this Chapter</a></p>",
  261.                    Tmp2);
  262. fprintf(stdout,"</ul>\n");
  263. fclose(out); out = NULL;
  264. }
  265. break;
  266. case 12:
  267.       {
  268. }
  269. break;
  270. case 13:
  271. {
  272.   
  273.   strcpy( sectname, yytext+9 );
  274.   if (!getlp( sectname ))
  275.     {
  276.       fprintf( stderr, "Problem with @@label!\n" );
  277.     } 
  278.   else
  279.     {
  280.       strcpy( labeltxt, sectname );
  281.     }
  282. }
  283. break;
  284. case 14:
  285.     {
  286.   
  287.   strcpy( sectname, yytext+9 );
  288.   if (!getlp( sectname ))
  289.     {
  290.       fprintf( stderr, "Problem with @@label!\n" );
  291.     } 
  292.   else
  293.     {
  294.       if( skipnewline ) {
  295.         sprintf( Tmp1, "<a name=\"%s\"> %s", sectname, Headbuf);
  296.     strcpy (Headbuf, Tmp1);
  297.     strcpy (Tmp1,"");
  298.       } else if( out ) {
  299.         fprintf( out, "<A Name=\"%s\"> ", sectname );
  300.       } else {
  301.     printf( "<A Name=\"%s\"> ", sectname );
  302.       }
  303.     }
  304. }
  305. break;
  306. case 15:
  307. {
  308.  
  309. #ifdef DEBUG
  310. fprintf( stderr, "DEBUG: yytext = <<%s>>\n", yytext );
  311. #endif
  312. if (sscanf( yytext, "<@@labelp>%[^#]#%d", sectname, &tmpfn ) != 2)
  313. {
  314.   fprintf( stderr, "Problem with @@labelp!\n" );
  315. #ifdef DEBUG
  316. fprintf( stderr, "DEBUG: sectname = <<%s>>\n", sectname );
  317. fprintf( stderr, "DEBUG: tmpfn = <<%d>>\n", tmpfn );
  318. #endif
  319. } else
  320. putlp( sectname, tmpfn );
  321.  
  322. }
  323. break;
  324. case 16:
  325.           {
  326.  
  327. strcpy( refname, yytext+7 );
  328. if (!(tmplp = getlp( refname )))
  329. {
  330.   fprintf( stderr, "Problem with @@ref!\n" );
  331.   skipnewline++;
  332. } else {
  333.   
  334.   if(tmplp->fileno==secnr) {
  335.     sprintf( Tmp1, "<a href=\"#%s\"> ", refname );
  336.   } else if(tmplp->fileno==0) {
  337.     sprintf( Tmp1, "<a href=\"%s.html#%s\"> ", firstname, refname );
  338.   } else { 
  339.     sprintf( Tmp1, "<a href=\"%s-%d.html#%s\"> ", firstname, tmplp->fileno,
  340.               refname );
  341.   }
  342.  
  343.   if(skipnewline) {
  344.      strcat( Headbuf, Tmp1);
  345.   } else {
  346.      strcpy( Headbuf, Tmp1);
  347.   }
  348.   skipnewline++ ;
  349. }
  350. }
  351. break;
  352. case 17:
  353. {
  354.  
  355.    sprintf( Tmp1," %s </a> ", refname );
  356.    strcat ( Headbuf, Tmp1);
  357. }
  358. break;
  359. case 18:
  360. {
  361.  
  362.    switch (skipnewline) {
  363.    case 1:
  364.      if (out) {
  365.         fprintf( out, "%s", Headbuf );
  366.      } else { 
  367.         printf( "%s", Headbuf);
  368.      }
  369.      break;
  370.    case 2:
  371.      break;
  372.    default:
  373.      fprintf( stderr, "Problem with @@endref!\n" );
  374.      break;
  375.    }
  376.    skipnewline--;
  377. }
  378. break;
  379. case 19:
  380.     { 
  381.  
  382. getstr( sectname, 0 );
  383.  
  384. if( out ) 
  385. {
  386.   fclose( out );
  387. }
  388. sprintf( outname, "%s-%d.html", firstname, filenum++ );
  389. out = fopen( outname, "w" );
  390. fprintf( out, "<title>%s</title>\n", sectname );
  391. if( strlen( labeltxt ))
  392. {
  393.   fprintf( out, "<A Name=\"%s\">\n", labeltxt );
  394.   labeltxt[0] = 0;
  395. }
  396. fprintf( out, "<h1>%s</h1> ", sectname );
  397. fprintf( stdout, "<h2><a href=\"%s\">%s</a></h2>\n", outname,
  398.     sectname );
  399.  
  400. BEGIN(0);
  401. }
  402. break;
  403. case 20:
  404.         {
  405.  
  406. if (skipnewline) {
  407.     strcat(Headbuf, yytext );
  408.   } else if( out ) {
  409.     fprintf( out, "%s", yytext );
  410.   } else {
  411.     ECHO;
  412.   }
  413. }
  414. break;
  415. case 21:
  416.         {
  417.  
  418. if(!skipnewline) {
  419.   if( out )
  420.   {
  421.     fprintf( out, "%s", yytext );
  422.   }
  423.   else
  424.   {
  425.     ECHO;
  426.   }
  427. }
  428. }
  429. break;
  430. case -1:
  431. break;
  432. default:
  433. fprintf(yyout,"bad switch yylook %d",nstr);
  434. } return(0); }
  435. /* end of yylex */
  436.  
  437. void
  438. main( int argc, char **argv )
  439. {
  440.   if( argc >= 2 )
  441.     {
  442.       strncpy( firstname, argv[1], 256 );
  443.     }
  444.   else
  445.     {
  446.       strcpy( firstname, "$$" );
  447.     }
  448.  
  449.   secnr=0;
  450.   yylex();
  451.  
  452.   if( out ) fclose( out );      
  453.  
  454.   exit( 0 );
  455. }
  456. int yyvstop[] = {
  457. 0,
  458.  
  459. 20,
  460. 0,
  461.  
  462. 20,
  463. 0,
  464.  
  465. 20,
  466. -19,
  467. 0,
  468.  
  469. 20,
  470. -19,
  471. 0,
  472.  
  473. 20,
  474. 0,
  475.  
  476. 21,
  477. 0,
  478.  
  479. 20,
  480. 0,
  481.  
  482. 19,
  483. 21,
  484. 0,
  485.  
  486. 20,
  487. -19,
  488. 0,
  489.  
  490. 20,
  491. -19,
  492. 0,
  493.  
  494. 20,
  495. 0,
  496.  
  497. 19,
  498. 0,
  499.  
  500. 20,
  501. -19,
  502. 0,
  503.  
  504. 20,
  505. 0,
  506.  
  507. 20,
  508. -19,
  509. 0,
  510.  
  511. 20,
  512. 0,
  513.  
  514. 20,
  515. 0,
  516.  
  517. 20,
  518. 0,
  519.  
  520. 20,
  521. 0,
  522.  
  523. 20,
  524. 0,
  525.  
  526. 20,
  527. 0,
  528.  
  529. 20,
  530. 0,
  531.  
  532. 20,
  533. 0,
  534.  
  535. 20,
  536. -19,
  537. 0,
  538.  
  539. 20,
  540. -19,
  541. 0,
  542.  
  543. 20,
  544. -19,
  545. 0,
  546.  
  547. 20,
  548. -19,
  549. 0,
  550.  
  551. 20,
  552. -19,
  553. 0,
  554.  
  555. 20,
  556. -19,
  557. 0,
  558.  
  559. 20,
  560. -19,
  561. 0,
  562.  
  563. 20,
  564. -19,
  565. 0,
  566.  
  567. 20,
  568. 0,
  569.  
  570. 20,
  571. 0,
  572.  
  573. 20,
  574. 0,
  575.  
  576. 20,
  577. 0,
  578.  
  579. 20,
  580. 0,
  581.  
  582. 20,
  583. 0,
  584.  
  585. 20,
  586. 0,
  587.  
  588. 20,
  589. 0,
  590.  
  591. 20,
  592. 0,
  593.  
  594. 20,
  595. -19,
  596. 0,
  597.  
  598. 20,
  599. -19,
  600. 0,
  601.  
  602. 20,
  603. -19,
  604. 0,
  605.  
  606. 20,
  607. -19,
  608. 0,
  609.  
  610. 20,
  611. -19,
  612. 0,
  613.  
  614. 20,
  615. -19,
  616. 0,
  617.  
  618. 20,
  619. -19,
  620. 0,
  621.  
  622. 20,
  623. -19,
  624. 0,
  625.  
  626. 20,
  627. -19,
  628. 0,
  629.  
  630. 20,
  631. 0,
  632.  
  633. 20,
  634. 0,
  635.  
  636. 20,
  637. 0,
  638.  
  639. 20,
  640. 0,
  641.  
  642. 20,
  643. 0,
  644.  
  645. 20,
  646. 0,
  647.  
  648. 20,
  649. 0,
  650.  
  651. 20,
  652. 0,
  653.  
  654. 20,
  655. 0,
  656.  
  657. 20,
  658. -19,
  659. 0,
  660.  
  661. 20,
  662. -19,
  663. 0,
  664.  
  665. 20,
  666. -19,
  667. 0,
  668.  
  669. 20,
  670. -19,
  671. 0,
  672.  
  673. 20,
  674. -19,
  675. 0,
  676.  
  677. 20,
  678. -19,
  679. 0,
  680.  
  681. 20,
  682. -19,
  683. 0,
  684.  
  685. 20,
  686. -19,
  687. 0,
  688.  
  689. 20,
  690. -19,
  691. 0,
  692.  
  693. 20,
  694. 0,
  695.  
  696. 20,
  697. 0,
  698.  
  699. 20,
  700. 0,
  701.  
  702. 20,
  703. 0,
  704.  
  705. 20,
  706. 0,
  707.  
  708. 20,
  709. 0,
  710.  
  711. 20,
  712. 0,
  713.  
  714. 20,
  715. 0,
  716.  
  717. 20,
  718. -16,
  719. 0,
  720.  
  721. 20,
  722. 0,
  723.  
  724. 20,
  725. 0,
  726.  
  727. 20,
  728. 0,
  729.  
  730. 20,
  731. 0,
  732.  
  733. 20,
  734. -1,
  735. 0,
  736.  
  737. 20,
  738. 0,
  739.  
  740. 20,
  741. -19,
  742. 0,
  743.  
  744. 20,
  745. -19,
  746. 0,
  747.  
  748. 20,
  749. -19,
  750. 0,
  751.  
  752. 20,
  753. -19,
  754. 0,
  755.  
  756. 20,
  757. -19,
  758. 0,
  759.  
  760. 20,
  761. -19,
  762. 0,
  763.  
  764. 20,
  765. -19,
  766. 0,
  767.  
  768. 20,
  769. -19,
  770. 0,
  771.  
  772. 20,
  773. -16,
  774. -19,
  775. 0,
  776.  
  777. 20,
  778. -19,
  779. 0,
  780.  
  781. 20,
  782. -19,
  783. 0,
  784.  
  785. 20,
  786. -19,
  787. 0,
  788.  
  789. 20,
  790. -19,
  791. 0,
  792.  
  793. 20,
  794. -1,
  795. -19,
  796. 0,
  797.  
  798. 20,
  799. -19,
  800. 0,
  801.  
  802. 20,
  803. 0,
  804.  
  805. 20,
  806. 0,
  807.  
  808. 20,
  809. 0,
  810.  
  811. 20,
  812. 0,
  813.  
  814. 20,
  815. 0,
  816.  
  817. 20,
  818. 0,
  819.  
  820. 20,
  821. 0,
  822.  
  823. 20,
  824. -5,
  825. 0,
  826.  
  827. 20,
  828. 0,
  829.  
  830. 16,
  831. 0,
  832.  
  833. 20,
  834. 0,
  835.  
  836. 20,
  837. -7,
  838. 0,
  839.  
  840. 20,
  841. 0,
  842.  
  843. 20,
  844. 0,
  845.  
  846. 1,
  847. 0,
  848.  
  849. 20,
  850. 0,
  851.  
  852. 20,
  853. -19,
  854. 0,
  855.  
  856. 20,
  857. -19,
  858. 0,
  859.  
  860. 20,
  861. -19,
  862. 0,
  863.  
  864. 20,
  865. -19,
  866. 0,
  867.  
  868. 20,
  869. -19,
  870. 0,
  871.  
  872. 20,
  873. -19,
  874. 0,
  875.  
  876. 20,
  877. -19,
  878. 0,
  879.  
  880. 20,
  881. -5,
  882. -19,
  883. 0,
  884.  
  885. 20,
  886. -19,
  887. 0,
  888.  
  889. 16,
  890. 19,
  891. 0,
  892.  
  893. 20,
  894. -19,
  895. 0,
  896.  
  897. 20,
  898. -7,
  899. -19,
  900. 0,
  901.  
  902. 20,
  903. -19,
  904. 0,
  905.  
  906. 20,
  907. -19,
  908. 0,
  909.  
  910. 1,
  911. 19,
  912. 0,
  913.  
  914. 20,
  915. -19,
  916. 0,
  917.  
  918. 20,
  919. -9,
  920. 0,
  921.  
  922. 20,
  923. 0,
  924.  
  925. 20,
  926. 0,
  927.  
  928. 20,
  929. 0,
  930.  
  931. 20,
  932. 0,
  933.  
  934. 20,
  935. 0,
  936.  
  937. 20,
  938. 0,
  939.  
  940. 5,
  941. 0,
  942.  
  943. 20,
  944. -14,
  945. 0,
  946.  
  947. 20,
  948. 0,
  949.  
  950. 20,
  951. 0,
  952.  
  953. 7,
  954. 0,
  955.  
  956. 20,
  957. -8,
  958. 0,
  959.  
  960. 20,
  961. -4,
  962. 0,
  963.  
  964. 20,
  965. 0,
  966.  
  967. 20,
  968. -9,
  969. -19,
  970. 0,
  971.  
  972. 20,
  973. -19,
  974. 0,
  975.  
  976. 20,
  977. -19,
  978. 0,
  979.  
  980. 20,
  981. -19,
  982. 0,
  983.  
  984. 20,
  985. -19,
  986. 0,
  987.  
  988. 20,
  989. -19,
  990. 0,
  991.  
  992. 20,
  993. -19,
  994. 0,
  995.  
  996. 5,
  997. 19,
  998. 0,
  999.  
  1000. 20,
  1001. -13,
  1002. -14,
  1003. -19,
  1004. 0,
  1005.  
  1006. 20,
  1007. -19,
  1008. 0,
  1009.  
  1010. 20,
  1011. -19,
  1012. 0,
  1013.  
  1014. 7,
  1015. 19,
  1016. 0,
  1017.  
  1018. 20,
  1019. -8,
  1020. -19,
  1021. 0,
  1022.  
  1023. 20,
  1024. -4,
  1025. -19,
  1026. 0,
  1027.  
  1028. 20,
  1029. -19,
  1030. 0,
  1031.  
  1032. 9,
  1033. 0,
  1034.  
  1035. 20,
  1036. 0,
  1037.  
  1038. 20,
  1039. 0,
  1040.  
  1041. 20,
  1042. -18,
  1043. 0,
  1044.  
  1045. 20,
  1046. 0,
  1047.  
  1048. 20,
  1049. 0,
  1050.  
  1051. 20,
  1052. -3,
  1053. 0,
  1054.  
  1055. 14,
  1056. 0,
  1057.  
  1058. 20,
  1059. -15,
  1060. 0,
  1061.  
  1062. 20,
  1063. -17,
  1064. 0,
  1065.  
  1066. 8,
  1067. 0,
  1068.  
  1069. 4,
  1070. 0,
  1071.  
  1072. 20,
  1073. -2,
  1074. 0,
  1075.  
  1076. 9,
  1077. 19,
  1078. 0,
  1079.  
  1080. 20,
  1081. -19,
  1082. 0,
  1083.  
  1084. 20,
  1085. -19,
  1086. 0,
  1087.  
  1088. 20,
  1089. -18,
  1090. -19,
  1091. 0,
  1092.  
  1093. 20,
  1094. -19,
  1095. 0,
  1096.  
  1097. 20,
  1098. -19,
  1099. 0,
  1100.  
  1101. 20,
  1102. -3,
  1103. -19,
  1104. 0,
  1105.  
  1106. 13,
  1107. 14,
  1108. 19,
  1109. 0,
  1110.  
  1111. 20,
  1112. -15,
  1113. -19,
  1114. 0,
  1115.  
  1116. 20,
  1117. -17,
  1118. -19,
  1119. 0,
  1120.  
  1121. 8,
  1122. 19,
  1123. 0,
  1124.  
  1125. 4,
  1126. 19,
  1127. 0,
  1128.  
  1129. 20,
  1130. -2,
  1131. -19,
  1132. 0,
  1133.  
  1134. 20,
  1135. 0,
  1136.  
  1137. 20,
  1138. -6,
  1139. 0,
  1140.  
  1141. 18,
  1142. 0,
  1143.  
  1144. 20,
  1145. -11,
  1146. 0,
  1147.  
  1148. 20,
  1149. 0,
  1150.  
  1151. 3,
  1152. 0,
  1153.  
  1154. 15,
  1155. 0,
  1156.  
  1157. 17,
  1158. 0,
  1159.  
  1160. 2,
  1161. 0,
  1162.  
  1163. 20,
  1164. -19,
  1165. 0,
  1166.  
  1167. 20,
  1168. -6,
  1169. -19,
  1170. 0,
  1171.  
  1172. 18,
  1173. 19,
  1174. 0,
  1175.  
  1176. 20,
  1177. -11,
  1178. -19,
  1179. 0,
  1180.  
  1181. 20,
  1182. -19,
  1183. 0,
  1184.  
  1185. 3,
  1186. 19,
  1187. 0,
  1188.  
  1189. 15,
  1190. 19,
  1191. 0,
  1192.  
  1193. 17,
  1194. 19,
  1195. 0,
  1196.  
  1197. 2,
  1198. 19,
  1199. 0,
  1200.  
  1201. 20,
  1202. -10,
  1203. 0,
  1204.  
  1205. 6,
  1206. 0,
  1207.  
  1208. 11,
  1209. 0,
  1210.  
  1211. 20,
  1212. -12,
  1213. 0,
  1214.  
  1215. 20,
  1216. -10,
  1217. -19,
  1218. 0,
  1219.  
  1220. 6,
  1221. 19,
  1222. 0,
  1223.  
  1224. 11,
  1225. 19,
  1226. 0,
  1227.  
  1228. 20,
  1229. -12,
  1230. -19,
  1231. 0,
  1232.  
  1233. 10,
  1234. 0,
  1235.  
  1236. 12,
  1237. 0,
  1238.  
  1239. 10,
  1240. 19,
  1241. 0,
  1242.  
  1243. 12,
  1244. 19,
  1245. 0,
  1246. 0};
  1247. # define YYTYPE int
  1248. struct yywork { YYTYPE verify, advance; } yycrank[] = {
  1249. 0,0,    0,0,    1,5,    0,0,    
  1250. 4,9,    0,0,    7,5,    9,9,    
  1251. 0,0,    14,5,    16,5,    1,6,    
  1252. 3,8,    4,8,    5,0,    7,0,    
  1253. 9,12,    11,0,    14,0,    16,0,    
  1254. 17,5,    18,5,    19,5,    20,0,    
  1255. 23,5,    0,0,    22,5,    0,0,    
  1256. 15,9,    17,0,    18,0,    19,0,    
  1257. 21,5,    23,0,    29,9,    22,0,    
  1258. 39,5,    15,12,    37,5,    33,5,    
  1259. 32,0,    21,0,    35,5,    29,12,    
  1260. 36,5,    39,0,    34,0,    37,0,    
  1261. 33,0,    38,0,    40,5,    35,0,    
  1262. 0,0,    36,0,    55,0,    50,5,    
  1263. 0,0,    0,0,    0,0,    40,0,    
  1264. 0,0,    2,7,    0,0,    4,10,    
  1265. 50,0,    10,13,    13,15,    51,5,    
  1266. 52,0,    7,11,    53,0,    11,14,    
  1267. 76,76,    56,0,    57,0,    60,9,    
  1268. 51,0,    0,0,    81,81,    68,0,    
  1269. 0,0,    76,107,    0,0,    91,91,    
  1270. 60,12,    69,0,    73,0,    81,112,    
  1271. 96,96,    0,0,    79,0,    70,0,    
  1272. 91,123,    0,0,    75,0,    71,0,    
  1273. 72,0,    96,128,    0,0,    0,0,    
  1274. 0,0,    0,0,    0,0,    27,44,    
  1275. 0,0,    0,0,    80,0,    14,16,    
  1276. 26,43,    14,17,    24,41,    28,45,    
  1277. 14,18,    16,32,    20,36,    30,48,    
  1278. 14,19,    25,42,    19,35,    41,59,    
  1279. 31,49,    18,34,    14,20,    14,21,    
  1280. 14,22,    14,23,    15,24,    32,50,    
  1281. 15,25,    17,33,    22,39,    15,26,    
  1282. 21,37,    34,52,    29,46,    15,27,    
  1283. 37,55,    23,40,    33,51,    35,53,    
  1284. 38,56,    15,28,    15,29,    15,30,    
  1285. 15,31,    36,54,    21,38,    42,60,    
  1286. 29,47,    43,61,    44,62,    39,57,    
  1287. 45,63,    46,64,    47,65,    48,66,    
  1288. 49,67,    40,58,    52,74,    54,5,    
  1289. 55,78,    53,75,    56,79,    58,0,    
  1290. 59,83,    51,69,    50,68,    61,89,    
  1291. 54,0,    62,90,    51,70,    64,93,    
  1292. 57,80,    60,84,    65,94,    63,9,    
  1293. 66,95,    67,96,    60,85,    69,99,    
  1294. 51,71,    51,72,    70,100,    51,73,    
  1295. 63,12,    68,98,    71,101,    72,102,    
  1296. 60,86,    60,87,    73,104,    60,88,    
  1297. 75,106,    74,5,    77,0,    78,0,    
  1298. 79,110,    80,111,    82,0,    83,114,    
  1299. 84,115,    72,103,    74,0,    85,116,    
  1300. 86,117,    87,118,    88,120,    89,121,    
  1301. 90,122,    92,124,    93,125,    94,126,    
  1302. 95,127,    97,129,    98,0,    58,81,    
  1303. 99,0,    100,0,    101,0,    87,119,    
  1304. 54,76,    103,0,    102,0,    104,0,    
  1305. 105,105,    67,97,    106,5,    110,0,    
  1306. 108,5,    109,109,    111,0,    113,0,    
  1307. 114,145,    105,137,    115,146,    106,0,    
  1308. 63,91,    108,0,    109,141,    116,147,    
  1309. 117,148,    118,149,    119,150,    120,151,    
  1310. 121,121,    124,155,    122,9,    78,109,    
  1311. 125,125,    126,157,    127,158,    129,159,    
  1312. 130,130,    121,152,    74,105,    122,12,    
  1313. 131,0,    125,156,    132,0,    134,0,    
  1314. 135,0,    130,160,    133,0,    58,82,    
  1315. 136,0,    138,138,    98,130,    139,0,    
  1316. 54,77,    142,142,    140,0,    143,143,    
  1317. 144,0,    146,174,    138,167,    147,175,    
  1318. 148,176,    145,145,    142,170,    110,142,    
  1319. 143,171,    77,108,    111,143,    149,177,    
  1320. 63,92,    82,113,    145,173,    106,138,    
  1321. 150,178,    151,179,    153,153,    154,181,    
  1322. 155,182,    157,157,    159,185,    161,0,    
  1323. 158,158,    163,163,    162,0,    153,180,    
  1324. 164,0,    165,0,    157,183,    99,131,    
  1325. 100,132,    158,184,    163,188,    122,153,    
  1326. 166,166,    168,168,    101,133,    102,134,    
  1327. 103,135,    174,195,    133,163,    175,196,    
  1328. 136,166,    166,191,    168,192,    139,168,    
  1329. 169,169,    104,136,    140,169,    172,172,    
  1330. 144,172,    176,176,    177,198,    178,199,    
  1331. 186,0,    169,193,    113,144,    179,179,    
  1332. 172,194,    181,181,    176,197,    182,182,    
  1333. 108,140,    106,139,    185,185,    190,0,    
  1334. 179,200,    195,208,    181,201,    199,211,    
  1335. 182,202,    187,187,    189,189,    185,203,    
  1336. 132,162,    135,165,    162,187,    196,196,    
  1337. 164,189,    198,198,    187,205,    189,206,    
  1338. 0,0,    122,154,    131,161,    204,204,    
  1339. 196,209,    207,207,    198,210,    208,208,    
  1340. 211,211,    134,164,    0,0,    0,0,    
  1341. 204,212,    0,0,    207,213,    0,0,    
  1342. 208,214,    211,215,    0,0,    0,0,    
  1343. 0,0,    0,0,    0,0,    0,0,    
  1344. 186,204,    0,0,    0,0,    0,0,    
  1345. 0,0,    0,0,    0,0,    0,0,    
  1346. 0,0,    0,0,    0,0,    190,207,    
  1347. 0,0,    0,0,    0,0,    0,0,    
  1348. 0,0,    0,0,    0,0,    0,0,    
  1349. 0,0,    161,186,    0,0,    0,0,    
  1350. 0,0,    0,0,    0,0,    165,190,    
  1351. 0,0};
  1352. struct yysvf yysvec[] = {
  1353. 0,    0,    0,
  1354. yycrank+-1,    0,        yyvstop+1,
  1355. yycrank+-1,    yysvec+1,    yyvstop+3,
  1356. yycrank+-2,    yysvec+1,    yyvstop+5,
  1357. yycrank+-3,    0,        yyvstop+8,
  1358. yycrank+-4,    yysvec+1,    yyvstop+11,
  1359. yycrank+0,    0,        yyvstop+13,
  1360. yycrank+-5,    0,        yyvstop+15,
  1361. yycrank+0,    0,        yyvstop+17,
  1362. yycrank+-6,    0,        yyvstop+20,
  1363. yycrank+-1,    yysvec+9,    yyvstop+23,
  1364. yycrank+-7,    yysvec+7,    yyvstop+26,
  1365. yycrank+0,    0,        yyvstop+28,
  1366. yycrank+-2,    yysvec+9,    yyvstop+30,
  1367. yycrank+-8,    0,        yyvstop+33,
  1368. yycrank+-27,    0,        yyvstop+35,
  1369. yycrank+-9,    0,        yyvstop+38,
  1370. yycrank+-19,    0,        yyvstop+40,
  1371. yycrank+-20,    0,        yyvstop+42,
  1372. yycrank+-21,    0,        yyvstop+44,
  1373. yycrank+-13,    yysvec+18,    yyvstop+46,
  1374. yycrank+-31,    0,        yyvstop+48,
  1375. yycrank+-25,    0,        yyvstop+50,
  1376. yycrank+-23,    0,        yyvstop+52,
  1377. yycrank+-6,    yysvec+9,    yyvstop+54,
  1378. yycrank+-7,    yysvec+9,    yyvstop+57,
  1379. yycrank+-7,    yysvec+9,    yyvstop+60,
  1380. yycrank+-6,    yysvec+9,    yyvstop+63,
  1381. yycrank+-10,    yysvec+9,    yyvstop+66,
  1382. yycrank+-33,    0,        yyvstop+69,
  1383. yycrank+-10,    yysvec+9,    yyvstop+72,
  1384. yycrank+-6,    yysvec+9,    yyvstop+75,
  1385. yycrank+-30,    yysvec+19,    yyvstop+78,
  1386. yycrank+-38,    0,        yyvstop+80,
  1387. yycrank+-36,    yysvec+19,    yyvstop+82,
  1388. yycrank+-41,    0,        yyvstop+84,
  1389. yycrank+-43,    0,        yyvstop+86,
  1390. yycrank+-37,    0,        yyvstop+88,
  1391. yycrank+-39,    yysvec+18,    yyvstop+90,
  1392. yycrank+-35,    0,        yyvstop+92,
  1393. yycrank+-49,    0,        yyvstop+94,
  1394. yycrank+-22,    yysvec+9,    yyvstop+96,
  1395. yycrank+-47,    yysvec+9,    yyvstop+99,
  1396. yycrank+-52,    yysvec+9,    yyvstop+102,
  1397. yycrank+-52,    yysvec+9,    yyvstop+105,
  1398. yycrank+-50,    yysvec+9,    yyvstop+108,
  1399. yycrank+-54,    yysvec+9,    yyvstop+111,
  1400. yycrank+-53,    yysvec+9,    yyvstop+114,
  1401. yycrank+-39,    yysvec+9,    yyvstop+117,
  1402. yycrank+-48,    yysvec+9,    yyvstop+120,
  1403. yycrank+-54,    0,        yyvstop+123,
  1404. yycrank+-66,    0,        yyvstop+125,
  1405. yycrank+-58,    yysvec+33,    yyvstop+127,
  1406. yycrank+-60,    yysvec+18,    yyvstop+129,
  1407. yycrank+-158,    0,        yyvstop+131,
  1408. yycrank+-44,    yysvec+39,    yyvstop+133,
  1409. yycrank+-63,    yysvec+37,    yyvstop+135,
  1410. yycrank+-64,    yysvec+40,    yyvstop+137,
  1411. yycrank+-153,    yysvec+54,    yyvstop+139,
  1412. yycrank+-52,    yysvec+9,    yyvstop+141,
  1413. yycrank+-74,    0,        yyvstop+144,
  1414. yycrank+-67,    yysvec+9,    yyvstop+147,
  1415. yycrank+-68,    yysvec+9,    yyvstop+150,
  1416. yycrank+-174,    0,        yyvstop+153,
  1417. yycrank+-55,    yysvec+9,    yyvstop+156,
  1418. yycrank+-75,    yysvec+9,    yyvstop+159,
  1419. yycrank+-68,    yysvec+9,    yyvstop+162,
  1420. yycrank+-115,    yysvec+63,    yyvstop+165,
  1421. yycrank+-69,    yysvec+39,    yyvstop+168,
  1422. yycrank+-75,    yysvec+16,    yyvstop+170,
  1423. yycrank+-81,    yysvec+18,    yyvstop+172,
  1424. yycrank+-85,    yysvec+18,    yyvstop+174,
  1425. yycrank+-86,    yysvec+21,    yyvstop+176,
  1426. yycrank+-76,    yysvec+23,    yyvstop+178,
  1427. yycrank+-192,    0,        yyvstop+180,
  1428. yycrank+-84,    yysvec+40,    yyvstop+182,
  1429. yycrank+-71,    0,        yyvstop+184,
  1430. yycrank+-184,    yysvec+19,    yyvstop+187,
  1431. yycrank+-185,    yysvec+74,    yyvstop+189,
  1432. yycrank+-80,    yysvec+39,    yyvstop+191,
  1433. yycrank+-96,    yysvec+18,    yyvstop+193,
  1434. yycrank+-77,    0,        yyvstop+195,
  1435. yycrank+-188,    yysvec+19,    yyvstop+198,
  1436. yycrank+-83,    yysvec+9,    yyvstop+200,
  1437. yycrank+-96,    yysvec+9,    yyvstop+203,
  1438. yycrank+-102,    yysvec+9,    yyvstop+206,
  1439. yycrank+-103,    yysvec+9,    yyvstop+209,
  1440. yycrank+-104,    yysvec+29,    yyvstop+212,
  1441. yycrank+-92,    yysvec+9,    yyvstop+215,
  1442. yycrank+-145,    yysvec+9,    yyvstop+218,
  1443. yycrank+-100,    yysvec+9,    yyvstop+221,
  1444. yycrank+-82,    0,        yyvstop+224,
  1445. yycrank+-112,    yysvec+9,    yyvstop+228,
  1446. yycrank+-148,    yysvec+9,    yyvstop+231,
  1447. yycrank+-95,    yysvec+9,    yyvstop+234,
  1448. yycrank+-111,    yysvec+9,    yyvstop+237,
  1449. yycrank+-87,    0,        yyvstop+240,
  1450. yycrank+-116,    yysvec+9,    yyvstop+244,
  1451. yycrank+-204,    yysvec+74,    yyvstop+247,
  1452. yycrank+-206,    yysvec+19,    yyvstop+249,
  1453. yycrank+-207,    yysvec+19,    yyvstop+251,
  1454. yycrank+-208,    yysvec+36,    yyvstop+253,
  1455. yycrank+-212,    yysvec+37,    yyvstop+255,
  1456. yycrank+-211,    yysvec+18,    yyvstop+257,
  1457. yycrank+-213,    yysvec+40,    yyvstop+259,
  1458. yycrank+-223,    0,        yyvstop+261,
  1459. yycrank+-225,    0,        yyvstop+264,
  1460. yycrank+0,    0,        yyvstop+266,
  1461. yycrank+-227,    0,        yyvstop+268,
  1462. yycrank+-228,    0,        yyvstop+270,
  1463. yycrank+-217,    yysvec+74,    yyvstop+273,
  1464. yycrank+-220,    yysvec+74,    yyvstop+275,
  1465. yycrank+0,    0,        yyvstop+277,
  1466. yycrank+-221,    yysvec+108,    yyvstop+279,
  1467. yycrank+-170,    yysvec+9,    yyvstop+281,
  1468. yycrank+-137,    yysvec+9,    yyvstop+284,
  1469. yycrank+-142,    yysvec+9,    yyvstop+287,
  1470. yycrank+-138,    yysvec+9,    yyvstop+290,
  1471. yycrank+-142,    yysvec+9,    yyvstop+293,
  1472. yycrank+-141,    yysvec+9,    yyvstop+296,
  1473. yycrank+-135,    yysvec+9,    yyvstop+299,
  1474. yycrank+-243,    0,        yyvstop+302,
  1475. yycrank+-245,    0,        yyvstop+306,
  1476. yycrank+0,    0,        yyvstop+309,
  1477. yycrank+-136,    yysvec+9,    yyvstop+312,
  1478. yycrank+-247,    0,        yyvstop+315,
  1479. yycrank+-187,    yysvec+9,    yyvstop+319,
  1480. yycrank+-188,    yysvec+9,    yyvstop+322,
  1481. yycrank+0,    0,        yyvstop+325,
  1482. yycrank+-142,    yysvec+9,    yyvstop+328,
  1483. yycrank+-251,    0,        yyvstop+331,
  1484. yycrank+-246,    yysvec+50,    yyvstop+334,
  1485. yycrank+-248,    yysvec+33,    yyvstop+336,
  1486. yycrank+-252,    yysvec+74,    yyvstop+338,
  1487. yycrank+-249,    yysvec+39,    yyvstop+340,
  1488. yycrank+-250,    yysvec+37,    yyvstop+342,
  1489. yycrank+-254,    yysvec+74,    yyvstop+344,
  1490. yycrank+0,    0,        yyvstop+346,
  1491. yycrank+-264,    0,        yyvstop+348,
  1492. yycrank+-257,    yysvec+74,    yyvstop+351,
  1493. yycrank+-260,    yysvec+74,    yyvstop+353,
  1494. yycrank+0,    0,        yyvstop+355,
  1495. yycrank+-268,    0,        yyvstop+357,
  1496. yycrank+-270,    0,        yyvstop+360,
  1497. yycrank+-262,    yysvec+74,    yyvstop+363,
  1498. yycrank+-276,    0,        yyvstop+365,
  1499. yycrank+-161,    yysvec+9,    yyvstop+369,
  1500. yycrank+-175,    yysvec+9,    yyvstop+372,
  1501. yycrank+-214,    yysvec+9,    yyvstop+375,
  1502. yycrank+-167,    yysvec+9,    yyvstop+378,
  1503. yycrank+-189,    yysvec+9,    yyvstop+381,
  1504. yycrank+-227,    yysvec+9,    yyvstop+384,
  1505. yycrank+0,    0,        yyvstop+387,
  1506. yycrank+-289,    0,        yyvstop+390,
  1507. yycrank+-229,    yysvec+9,    yyvstop+395,
  1508. yycrank+-230,    yysvec+9,    yyvstop+398,
  1509. yycrank+0,    0,        yyvstop+401,
  1510. yycrank+-292,    0,        yyvstop+404,
  1511. yycrank+-295,    0,        yyvstop+408,
  1512. yycrank+-232,    yysvec+9,    yyvstop+412,
  1513. yycrank+0,    0,        yyvstop+415,
  1514. yycrank+-285,    yysvec+39,    yyvstop+417,
  1515. yycrank+-288,    yysvec+74,    yyvstop+419,
  1516. yycrank+-296,    0,        yyvstop+421,
  1517. yycrank+-290,    yysvec+74,    yyvstop+424,
  1518. yycrank+-291,    yysvec+39,    yyvstop+426,
  1519. yycrank+-307,    0,        yyvstop+428,
  1520. yycrank+0,    0,        yyvstop+431,
  1521. yycrank+-308,    0,        yyvstop+433,
  1522. yycrank+-319,    0,        yyvstop+436,
  1523. yycrank+0,    0,        yyvstop+439,
  1524. yycrank+0,    0,        yyvstop+441,
  1525. yycrank+-322,    0,        yyvstop+443,
  1526. yycrank+0,    0,        yyvstop+446,
  1527. yycrank+-197,    yysvec+9,    yyvstop+449,
  1528. yycrank+-253,    yysvec+9,    yyvstop+452,
  1529. yycrank+-324,    0,        yyvstop+455,
  1530. yycrank+-264,    yysvec+9,    yyvstop+459,
  1531. yycrank+-211,    yysvec+9,    yyvstop+462,
  1532. yycrank+-330,    0,        yyvstop+465,
  1533. yycrank+0,    0,        yyvstop+469,
  1534. yycrank+-332,    0,        yyvstop+473,
  1535. yycrank+-334,    0,        yyvstop+477,
  1536. yycrank+0,    0,        yyvstop+481,
  1537. yycrank+0,    0,        yyvstop+484,
  1538. yycrank+-337,    0,        yyvstop+487,
  1539. yycrank+-318,    yysvec+74,    yyvstop+491,
  1540. yycrank+-344,    0,        yyvstop+493,
  1541. yycrank+0,    0,        yyvstop+496,
  1542. yycrank+-345,    0,        yyvstop+498,
  1543. yycrank+-329,    yysvec+74,    yyvstop+501,
  1544. yycrank+0,    0,        yyvstop+503,
  1545. yycrank+0,    0,        yyvstop+505,
  1546. yycrank+0,    0,        yyvstop+507,
  1547. yycrank+0,    0,        yyvstop+509,
  1548. yycrank+-279,    yysvec+9,    yyvstop+511,
  1549. yycrank+-350,    0,        yyvstop+514,
  1550. yycrank+0,    0,        yyvstop+518,
  1551. yycrank+-352,    0,        yyvstop+521,
  1552. yycrank+-281,    yysvec+9,    yyvstop+525,
  1553. yycrank+0,    0,        yyvstop+528,
  1554. yycrank+0,    0,        yyvstop+531,
  1555. yycrank+0,    0,        yyvstop+534,
  1556. yycrank+0,    0,        yyvstop+537,
  1557. yycrank+-358,    0,        yyvstop+540,
  1558. yycrank+0,    0,        yyvstop+543,
  1559. yycrank+0,    0,        yyvstop+545,
  1560. yycrank+-360,    0,        yyvstop+547,
  1561. yycrank+-362,    0,        yyvstop+550,
  1562. yycrank+0,    0,        yyvstop+554,
  1563. yycrank+0,    0,        yyvstop+557,
  1564. yycrank+-363,    0,        yyvstop+560,
  1565. yycrank+0,    0,        yyvstop+564,
  1566. yycrank+0,    0,        yyvstop+566,
  1567. yycrank+0,    0,        yyvstop+568,
  1568. yycrank+0,    0,        yyvstop+571,
  1569. 0,    0,    0};
  1570. struct yywork *yytop = yycrank+407;
  1571. struct yysvf *yybgin = yysvec+1;
  1572. char yymatch[] = {
  1573. 00  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1574. 01  ,01  ,012 ,01  ,01  ,01  ,01  ,01  ,
  1575. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1576. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1577. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1578. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1579. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1580. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1581. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1582. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1583. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1584. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1585. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1586. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1587. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1588. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  1589. 0};
  1590. char yyextra[] = {
  1591. 0,1,1,1,1,1,1,1,
  1592. 1,1,1,1,1,1,1,1,
  1593. 1,1,1,1,0,0,0,0,
  1594. 0};
  1595. #ifndef lint
  1596. static    char ncform_sccsid[] = "@(#)ncform 1.6 88/02/08 SMI"; /* from S5R2 1.2 */
  1597. #endif
  1598.  
  1599. int yylineno =1;
  1600. # define YYU(x) x
  1601. # define NLSTATE yyprevious=YYNEWLINE
  1602. char yytext[YYLMAX];
  1603. struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
  1604. char yysbuf[YYLMAX];
  1605. char *yysptr = yysbuf;
  1606. int *yyfnd;
  1607. extern struct yysvf *yyestate;
  1608. int yyprevious = YYNEWLINE;
  1609. yylook(){
  1610.     register struct yysvf *yystate, **lsp;
  1611.     register struct yywork *yyt;
  1612.     struct yysvf *yyz;
  1613.     int yych, yyfirst;
  1614.     struct yywork *yyr;
  1615. # ifdef LEXDEBUG
  1616.     int debug;
  1617. # endif
  1618.     char *yylastch;
  1619.     /* start off machines */
  1620. # ifdef LEXDEBUG
  1621.     debug = 0;
  1622. # endif
  1623.     yyfirst=1;
  1624.     if (!yymorfg)
  1625.         yylastch = yytext;
  1626.     else {
  1627.         yymorfg=0;
  1628.         yylastch = yytext+yyleng;
  1629.         }
  1630.     for(;;){
  1631.         lsp = yylstate;
  1632.         yyestate = yystate = yybgin;
  1633.         if (yyprevious==YYNEWLINE) yystate++;
  1634.         for (;;){
  1635. # ifdef LEXDEBUG
  1636.             if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
  1637. # endif
  1638.             yyt = yystate->yystoff;
  1639.             if(yyt == yycrank && !yyfirst){  /* may not be any transitions */
  1640.                 yyz = yystate->yyother;
  1641.                 if(yyz == 0)break;
  1642.                 if(yyz->yystoff == yycrank)break;
  1643.                 }
  1644.             *yylastch++ = yych = input();
  1645.             yyfirst=0;
  1646.         tryagain:
  1647. # ifdef LEXDEBUG
  1648.             if(debug){
  1649.                 fprintf(yyout,"char ");
  1650.                 allprint(yych);
  1651.                 putchar('\n');
  1652.                 }
  1653. # endif
  1654.             yyr = yyt;
  1655.             if ( (int)yyt > (int)yycrank){
  1656.                 yyt = yyr + yych;
  1657.                 if (yyt <= yytop && yyt->verify+yysvec == yystate){
  1658.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  1659.                         {unput(*--yylastch);break;}
  1660.                     *lsp++ = yystate = yyt->advance+yysvec;
  1661.                     goto contin;
  1662.                     }
  1663.                 }
  1664. # ifdef YYOPTIM
  1665.             else if((int)yyt < (int)yycrank) {        /* r < yycrank */
  1666.                 yyt = yyr = yycrank+(yycrank-yyt);
  1667. # ifdef LEXDEBUG
  1668.                 if(debug)fprintf(yyout,"compressed state\n");
  1669. # endif
  1670.                 yyt = yyt + yych;
  1671.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  1672.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  1673.                         {unput(*--yylastch);break;}
  1674.                     *lsp++ = yystate = yyt->advance+yysvec;
  1675.                     goto contin;
  1676.                     }
  1677.                 yyt = yyr + YYU(yymatch[yych]);
  1678. # ifdef LEXDEBUG
  1679.                 if(debug){
  1680.                     fprintf(yyout,"try fall back character ");
  1681.                     allprint(YYU(yymatch[yych]));
  1682.                     putchar('\n');
  1683.                     }
  1684. # endif
  1685.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  1686.                     if(yyt->advance+yysvec == YYLERR)    /* error transition */
  1687.                         {unput(*--yylastch);break;}
  1688.                     *lsp++ = yystate = yyt->advance+yysvec;
  1689.                     goto contin;
  1690.                     }
  1691.                 }
  1692.             if ((yystate = yystate->yyother) && (yyt= yystate->yystoff) != yycrank){
  1693. # ifdef LEXDEBUG
  1694.                 if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
  1695. # endif
  1696.                 goto tryagain;
  1697.                 }
  1698. # endif
  1699.             else
  1700.                 {unput(*--yylastch);break;}
  1701.         contin:
  1702. # ifdef LEXDEBUG
  1703.             if(debug){
  1704.                 fprintf(yyout,"state %d char ",yystate-yysvec-1);
  1705.                 allprint(yych);
  1706.                 putchar('\n');
  1707.                 }
  1708. # endif
  1709.             ;
  1710.             }
  1711. # ifdef LEXDEBUG
  1712.         if(debug){
  1713.             fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
  1714.             allprint(yych);
  1715.             putchar('\n');
  1716.             }
  1717. # endif
  1718.         while (lsp-- > yylstate){
  1719.             *yylastch-- = 0;
  1720.             if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
  1721.                 yyolsp = lsp;
  1722.                 if(yyextra[*yyfnd]){        /* must backup */
  1723.                     while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
  1724.                         lsp--;
  1725.                         unput(*yylastch--);
  1726.                         }
  1727.                     }
  1728.                 yyprevious = YYU(*yylastch);
  1729.                 yylsp = lsp;
  1730.                 yyleng = yylastch-yytext+1;
  1731.                 yytext[yyleng] = 0;
  1732. # ifdef LEXDEBUG
  1733.                 if(debug){
  1734.                     fprintf(yyout,"\nmatch ");
  1735.                     sprint(yytext);
  1736.                     fprintf(yyout," action %d\n",*yyfnd);
  1737.                     }
  1738. # endif
  1739.                 return(*yyfnd++);
  1740.                 }
  1741.             unput(*yylastch);
  1742.             }
  1743.         if (yytext[0] == 0  /* && feof(yyin) */)
  1744.             {
  1745.             yysptr=yysbuf;
  1746.             return(0);
  1747.             }
  1748.         yyprevious = yytext[0] = input();
  1749.         if (yyprevious>0)
  1750.             output(yyprevious);
  1751.         yylastch=yytext;
  1752. # ifdef LEXDEBUG
  1753.         if(debug)putchar('\n');
  1754. # endif
  1755.         }
  1756.     }
  1757. yyback(p, m)
  1758.     int *p;
  1759. {
  1760. if (p==0) return(0);
  1761. while (*p)
  1762.     {
  1763.     if (*p++ == m)
  1764.         return(1);
  1765.     }
  1766. return(0);
  1767. }
  1768.     /* the following are only used in the lex library */
  1769. yyinput(){
  1770.     return(input());
  1771.     }
  1772. yyoutput(c)
  1773.   int c; {
  1774.     output(c);
  1775.     }
  1776. yyunput(c)
  1777.    int c; {
  1778.     unput(c);
  1779.     }
  1780.